<?php
require('config.php');
/* ajax page for comments and bug submission */

$address = BUG_EMAIL;

// check incoming data
if (!isset($_POST['msg']) || $_POST['msg'] == '') die('LOL, you didn\'t submit anything');

$subject = 'Armory comment from '.$_SERVER['REMOTE_ADDR'];
$body = "User-Agent:\n".$_SERVER['HTTP_USER_AGENT']."\n\nMessage:\n".$_POST['msg'];

if (mail($address, $subject, $body)) {
	echo "Thanks, your comment has been posted!";
} else {
	echo "Failed to submit your comments, please try later, or email thrissa@gmail.com :(";
}

?>